package ru.spbu.math.android.cbrf.dataprovider;

import ru.spbu.math.android.cbrf.model.Category;
import ru.spbu.math.android.cbrf.model.Rate;
import ru.spbu.math.android.cbrf.model.RateType;

import java.util.Date;
import java.util.List;

/**
 * Interface for provider
 *
 */

/**
 * @author m08noa
 *
 */
public interface IProvider {
	
	/**
	 * @param id
	 * @return latest available rate
	 */
	public Rate getCurrentRate(String id) throws UnavailableValueException ;

	/**
	 * @param id
	 * @param Date since
	 * @param Date until
	 * @return Rates Dynamic as Rates array
	 */
	public List<Rate> getDynamicRates(String id, Date since, Date until) throws UnavailableValueException ;

	/**
	 * @return Collection of all categories available in this provider
	 */
	public List<Category> getCategories();
	
	/**
	 * @param category
	 * @return List of all RateTypes belonging to this category and available in this provider
	 */
	public List<RateType> getRateTypeByCategory(Category category);
	
	/**
	 * @return data source name
	 */
	public String getName();
}
